import axios from 'axios';


var instance = axios.create({
  baseURL: 'https://www.baidu.com',
  timeout: 2000,
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json; charset=utf-8',
    'Access-Control-Allow-Origin':'*',
  }
});

instance.interceptors.request.use(function (config) {   //所有的请求都会先走这里
  return config
})
instance.interceptors.response.use(function (config) {   //所有的响应都会先走这里

  return config
})

export default instance